import Vue from "vue";
// 1.加载element-ui
import ElementUI from "element-ui";
// 1.1 引入elementUi样式文件
import "element-ui/lib/theme-chalk/index.css";
// 1.2 注册elementUI
Vue.use(ElementUI);

import "assets/css/base.css";
import "assets/css/normalize.css";
// 加载路由
import router from "./router";
import store from "./store";
import App from "./App.vue";

router.beforeEach((to, from, next) => {
  /*路由发生变化时修改页面title*/
  document.title = to.meta.title && to.meta.title;
  next();
});

Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
